home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK2.toast / Development Kits (Disc 2) / QuickTime / Programming Stuff / Documentation / develop articles / develop Issue 17 / MultipleMovies / MyMultipleMoviesApp ƒ / MyApplication.h < prev    next >
Encoding:
Text File  |  1997-02-26  |  2.4 KB  |  88 lines  |  [TEXT/KAHL]

  1. //--------------------------------------------------------------------------
  2. //
  3. //        MyApplication.
  4. //            by John Wang
  5. //
  6. //        Description:    Sample Application.
  7. //
  8. //        Version:    1.0        09/07/93    Not perfect, but done.
  9. //
  10. //--------------------------------------------------------------------------
  11.  
  12. //    #includes
  13.  
  14. #include    <Movies.h>
  15.  
  16. //    #defines
  17.  
  18. #define        NEWDOCATSTARTUP        1    //    set to 1 if MyNew called at startup.  0 is not called.
  19. #define        MYEVENTDEF            2    //    2 is per window.  1 is once per eventloop.  0 is never.
  20. #define        MYIDLEDEF            2    //    2 is per window.  1 is once per eventloop.  0 is never.
  21. #define        MAS_WINDOWDOC        1000
  22. #define        MAS_WINDOWCLIP        1002
  23.  
  24. #define        MENU_COLLECTION            160
  25. #define        MENU_MACADDRESATOM        2
  26. #define        MENU_MACADDALL            3
  27. #define        MENU_CROSSADDALL        6
  28. #define        MENU_BOTHADDALL            9
  29.  
  30. #define        MENU_MOVIES                161
  31.  
  32. #define        ALERT_ERROROPEN        160
  33. #define        ALERT_BADDOCUMENT    161
  34. #define        ALERT_CANTNEW        162
  35. #define        ALERT_CANTOPEN        163
  36. #define        ALERT_SELECTEDMOVIE    164
  37.  
  38. //--------------------------------------------------------------------------
  39.  
  40. //    Globals.
  41.  
  42. extern        Boolean gDoneFlag;
  43.  
  44. //--------------------------------------------------------------------------
  45.  
  46. //    Prototypes.
  47.  
  48. OSErr        MyInitialize(void);
  49. Boolean        MyEvent(WindowPtr theWindow, EventRecord *myEvent);
  50. void        MyIdle(WindowPtr theWindow);
  51. OSErr        MyDoCommand(short theMenu, short theItem);
  52. void        MyDoKeyDown(EventRecord *myEvent);
  53. void        MyDraw(WindowPtr theWindow);
  54. void        MyFinishup(void);
  55. long        MyYieldTime(long message);
  56. void        MyInContent(WindowPtr foundWindow, Point where);
  57. void        MyZoomWindow(WindowPtr foundWindow, Boolean zoomOut);
  58. void        MyAdjustMenus(void);
  59.  
  60. void        MyNew(void);
  61. void        MyOpen(FSSpec *theFSS);
  62. void        MyClose(void);
  63. void        MySave(void);
  64. void        MySaveAs(void);
  65. void        MyPageSetup(void);
  66. void        MyPrint(void);
  67.  
  68. void        MyUndo(void);
  69. void        MyCut(void);
  70. void        MyCopy(void);
  71. void        MyPaste(void);
  72. void        MyClear(void);
  73. void        MySelectAll(void);
  74.  
  75. Boolean        IsMyWindow(WindowPtr theWindow);
  76. void        SetMyWindow(WindowPtr theWindow);
  77. Boolean        IsMyClipWindow(WindowPtr theWindow);
  78. void        SetMyClipWindow(WindowPtr theWindow);
  79.  
  80. void        adjustMoviesMenu(WindowPtr theWindow);
  81. void        SelectThisMovie(short item);
  82.  
  83. void        getNewMovie(Movie *theMovie, Str255 *movieName);
  84. void        Mac_AddMovieResAtom(short *docRefNum, FSSpec *docFSSpec);
  85. void        Mac_AddMovieAll(short *docRefNum, FSSpec *docFSSpec);
  86. void        Cross_AddMovieAll(short *docRefNum, FSSpec *docFSSpec);
  87. void        Both_AddMovieAll(short *docRefNum, FSSpec *docFSSpec);
  88.